package com.suray.basic.wcs.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ParamConfig {
    public static int CONVERY_DEFAULT_TASK_ID = 9999;

    public static Boolean singleAutoDoor;

    /**
     * 扫码开始读取字段
     */
    public static int scanStartFlag;

    /**
     * 扫码结束读取字段
     */
    public static int scanEndFlag;

    /**
     * 心跳多少次记录一次
     */
    public static int rgvLogRecordTime;

    /**
     * 最长校准时间
     */
    public static int maxCalibrationTime;

    /**
     * 当前是否是调试模式
     */
    public static boolean isDebugModel;

    /**
     * 5代车任务报文类型:RgvTaskMessageType
     */
    public static int rgvTaskMessageType;

    /**
     * 特殊位置速度距离
     */
    public static int specialSpeedDistance;

    /**
     * 库口任务数量差距达到3以上时，重新分配库口
     */
    public static int portTaskNumGap;

    @Value("${suray.task.portTaskNumGap:3}")
    public void setPortTaskNumGap(int value) {
        ParamConfig.portTaskNumGap = value;
    }

    @Value("${suray.rgv.rgvTaskMessageType:0}")
    public void setRgvTaskMessageType(int value) {
        ParamConfig.rgvTaskMessageType = value;
    }

    @Value("${suray.rgv.specialSpeedDistance:5000}")
    public void setSpecialSpeedDistance(int value) {
        ParamConfig.specialSpeedDistance = value;
    }

    @Value("${suray.runForGCode.maxCalibrationTime:3000}")
    public void setMaxCalibrationTime(int value) {
        ParamConfig.maxCalibrationTime = value;
    }

    @Value("${suray.rgvLog.rgvLogRecordTime}")
    public void setRgvLogRecordTime(int value) {
        ParamConfig.rgvLogRecordTime = value;
    }

    @Value("${suray.scanParam.scanStartFlag}")
    public void setScanStartFlag(int c) {
        ParamConfig.scanStartFlag = c;
    }

    @Value("${suray.scanParam.scanEndFlag}")
    public void setScanEndFlag(int c) {
        ParamConfig.scanEndFlag = c;
    }
}
